package com.yjd.comm.asynmsg.enums;

/**
 * <b>description</b>：任务消息类型 <br>
 * <b>time</b>：2015-1-26下午6:53:14 <br>
 * <b>author</b>： ready likun_557@163.com
 */
public enum TaskMsgTypeEnum {
	test("test", "测试"), releaseBidSuccess("releaseBidSuccess", "发布标的"), fullBidAuditSuccess(
			"fullBidAuditSuccess", "满标审核通过"), borrowerRepaySuccess(
			"borrowerRepaySuccess", "借款人还款成功"), repayToInvestorSuccess(
			"repayToInvestorSuccess", "投资人收到还款"), creditorTransferSuccess(
			"creditorTransferSuccess", "债权转让成功"),fraudLogin("fraudLogin","同盾登陆对接"),fraudRegister("fraudRegister","同盾注册对接"),
			userBidSuccess("userBidSuccess","用户投标成功"),
			buyCreditorSuccess("buyCreditor","用户购买债权成功"),
			wal_money_into("wal_money_into", "小钱包资金转入"),
			registSuccess("registSuccess","注册成功"),
			creditor_maturaty("creditor_maturaty", "债权到期"),
			
	/*
	 * 		到期回收
	 */
	Notify_XQB_Borrow_Status_Ending("Notify_XQB_Borrow_End","通知小钱包标的到期"),
	gold_match_creditor("gold_match_creditor", "给医信宝用户匹配债权"),
	gold_recycle_creditor("gold_recycle_creditor", "回收医信宝用户的债权"),
	gold_temp_account_buy_creditor("gold_temp_account_buy_creditor", "中间账户购买债权"),
	gold_creditor_maturaty("gold_creditor_maturaty", "债权到期中间账户回收债权"),job_re_excue("job_re_excue","失败job重新执行");
	
			

	private String msgType;
	private String description;

	private TaskMsgTypeEnum(String msgType, String description) {
		this.msgType = msgType;
		this.description = description;
	}

	public String getMsgType() {
		return msgType;
	}

	public String getDescription() {
		return description;
	}

	public static TaskMsgTypeEnum get(String msgType) {
		TaskMsgTypeEnum[] enums = TaskMsgTypeEnum.values();
		for (TaskMsgTypeEnum enum1 : enums) {
			if (enum1.getMsgType().equals(msgType)) {
				return enum1;
			}
		}
		return null;
	}

	public static String getDesc(String msgType) {
		TaskMsgTypeEnum enum1 = TaskMsgTypeEnum.get(msgType);
		return enum1 != null ? enum1.getDescription() : null;
	}
}
